#ifndef NOTE_H
#define NOTE_H
//  File:         Note.h
//  Author:       Scott Nordmann & Lauren Wallace
//  Description:  A class definition for the Note.
#include "Entry.h"
#include<string>

class Note : public Entry
{
public:
	//constructors
	Note(const std::string& creator, int prio = MIN_PRIORITY);
	Note(const std::string& creator,const std::string& titl,const std::string& cont, int prio = MIN_PRIORITY);

	//destructor
	~Note();

	//priority
	int getPriority() const;
	void setPriority(int prio);

	//does some math on priority.
	static int convertPriority(int prio) ;

	//get min and max
	static int getMinPriority();
	static int getMaxPriority();

	
	//displays the title and content of note
	virtual void display() const;

	virtual void populate();
	void edit();


	virtual bool operator==(const Note& n) const;
	virtual bool operator!=(const Note& n) const;
	virtual bool operator==(int prio) const;
	virtual bool operator!=(int prio) const;
	virtual bool operator<(const Note& n) const;
	virtual bool operator>(const Note& n) const;

private:
	
	int priority;

	static int MIN_PRIORITY ; //must be a positive number
	static int MAX_PRIORITY ; //must be a positive number

	
};
std :: ostream& operator<<(std::ostream& os, const Note& N);
inline int Note::getPriority() const { return priority; }
inline int Note::getMinPriority() { return MIN_PRIORITY; }
inline int Note::getMaxPriority() { return MAX_PRIORITY; }

inline bool Note::operator==(const Note& n) const
{
	return (getTitle() == n.getTitle());
}

inline bool Note::operator!=(const Note& n) const
{
	return !(*this == n);
}
inline bool Note::operator==(int prio) const
{
	return (getPriority() == prio);
}

inline bool Note::operator!=(int prio) const
{
	return !(*this == prio);
}

inline bool Note::operator<(const Note& n) const
{
	return (getTitle() < n.getTitle());
}

inline bool Note::operator>(const Note& n) const
{
	return !(*this < n || *this == n);
}

#endif